package com.crane.oss.enums;

/**
 * 用户身份
 * 
 * @author tyh
 *
 */
public enum UserIdentityEnum {
	
	mother(1, "妈妈"),
	father(2, "爸爸"),
	grandfather(3, "爷爷"),
	grandmother(4, "奶奶"),
	grandpa(5, "外公"),
	maternal(6, "外婆");

	private Integer type;

	private String remark;

	private UserIdentityEnum(Integer type, String remark) {
		this.type = type;
		this.remark = remark;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public static String getRemark(Integer type) {
		for (UserIdentityEnum identity : UserIdentityEnum.values()) {
			if (identity.getType().equals(type)) {
				return identity.getRemark();
			}
		}
		return "";
	}
}
